from machine import Pin
import time

while True:
    pin = Pin(2, Pin.IN)
    print(pin.value())
    time.sleep(0.1)
